const add = (a, b) => a + b

const addAsync = (a, b) => {
    return new Promise(
        (resolve, reject) => {
            setTimeout(
                () => resolve(a + b),
                3000
            );
        }
    )
}

// addAsync(2, 3).then(result => console.log(result))
(async function main(){
    const result = await addAsync(2,3)
    console.log(result);
})()